<?php
class Zend_View_Helper_ShowZoneIndex {
    public function showZoneIndex($view) {

    	$zone = $view->Zone;
    	$str='';
        $str .= '<a href="'.$view->url(array('controller'=>'zone', 'action'=>'add')).'"> Thêm Zone Mới</a>';
        $str .= '<table id="product-table" border="0" cellpadding="0" cellspacing="0" width="100%">';
		$str .= '<tr>';
		
		
		$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Id</a></th>';
		$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Tên</a></th>';
		$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Rộng</a></th>';
		$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Cao</a></th>';
		$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Mô Tả</a></th>';
		$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Giá</a></th>';
		$str .= '<th class="table-header-repeat line-left minwidth-2"><a href="">Thao Tác</a></th>';
		
		$str .= '</tr>';

        
        foreach ($zone as $zone) {
        	$str .= '<tr>'; 	
            $str .='<td>'.$zone->zone_id.'</th>';
            $str .='<td>'.$zone->name.'</th>';
			$str .='<td>'.$zone->width.'</th>';
			$str .='<td>'.$zone->height.'</th>';
			$str .='<td>'.$zone->description.'</th>';
			$str .='<td>'.$zone->price.'</th>';
			$str .= '<td class="options-width"><a class="icon-1 info-tooltip" href="'.$view->url(array('controller'=>'zone', 'action'=>'edit', 'zone_id'=>$zone->zone_id)).'" title="Sửa"></a> ';
			$str .= '<a title="Thêm" class="icon-3 info-tooltip" href="'.$view->url(array('controller'=>'zone', 'action'=>'add','zone_id'=>$zone->zone_id)).'"></a>';
            $str .= '<a class="icon-2 info-tooltip" href="'.$view->url(array('controller'=>'zone', 'action'=>'delete','zone_id'=>$zone->zone_id)).'" title="Xóa"></a></td>';       
            $str .='</tr>';
        }
        
        $str .= '</table>';
        
        return $str; 

    }
}